import React from 'react';
import PropTypes from 'prop-types';

class NavBar extends React.Component {
    render() {
        const {children} = this.props;
        console.log(typeof children, children);
        return (
            <div>
                <div>Left：{children[0]}</div>
                <div>Center：{children[1]}</div>
                <div>Right：{children[2]}</div>
            </div>
        );
    }
}

// 用于类型校验，可以删除
NavBar.propTypes = {
    children: PropTypes.element
}

export default NavBar